<?php

class Orden_Model_DbTable_Orden extends Zend_Db_Table_Abstract {

    protected $_name = 'orden';

    public function getTitle($id_orden) {
        $data = $this->fetchRow("id = " . $id_orden);
        if (count($data) > 0)
            return $data->title;
        return null;
    }

    public function getCombo() {
        $select = $this->_db->select()
                ->from($this->_name, array('key' => 'id', 'value' => 'title'));
        $result = $this->getAdapter()->fetchAll($select);
        return $result;
    }

}